\hypertarget{classduye_1_1_xml_printer}{\section{duye\-:\-:Xml\-Printer Class Reference}
\label{classduye_1_1_xml_printer}\index{duye\-::\-Xml\-Printer@{duye\-::\-Xml\-Printer}}
}


Print to memory functionality. The G\-Xml\-Printer is useful when you need to\-:  




{\ttfamily \#include $<$duye\-\_\-xml.\-h$>$}

Inheritance diagram for duye\-:\-:Xml\-Printer\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classduye_1_1_xml_printer}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classduye_1_1_xml_printer_a9aafdfedf4e43fe16acf7ad050bb2a39}{virtual bool \hyperlink{classduye_1_1_xml_printer_a9aafdfedf4e43fe16acf7ad050bb2a39}{visit\-Enter} (const \hyperlink{classduye_1_1_xml_document}{Xml\-Document} \&doc)}\label{classduye_1_1_xml_printer_a9aafdfedf4e43fe16acf7ad050bb2a39}

\begin{DoxyCompactList}\small\item\em Visit a document. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_a31307d01bbfe25b3e091576daf789c3f}{virtual bool \hyperlink{classduye_1_1_xml_printer_a31307d01bbfe25b3e091576daf789c3f}{visit\-Exit} (const \hyperlink{classduye_1_1_xml_document}{Xml\-Document} \&doc)}\label{classduye_1_1_xml_printer_a31307d01bbfe25b3e091576daf789c3f}

\begin{DoxyCompactList}\small\item\em Visit a document. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_aaf576803cf6862f13cf3add428160b91}{virtual bool \hyperlink{classduye_1_1_xml_printer_aaf576803cf6862f13cf3add428160b91}{visit\-Enter} (const \hyperlink{classduye_1_1_xml_element}{Xml\-Element} \&element, const \hyperlink{classduye_1_1_xml_attribute}{Xml\-Attribute} $\ast$first\-Attribute)}\label{classduye_1_1_xml_printer_aaf576803cf6862f13cf3add428160b91}

\begin{DoxyCompactList}\small\item\em Visit an element. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_af98341247a79474693d7d95370aae68c}{virtual bool \hyperlink{classduye_1_1_xml_printer_af98341247a79474693d7d95370aae68c}{visit\-Exit} (const \hyperlink{classduye_1_1_xml_element}{Xml\-Element} \&element)}\label{classduye_1_1_xml_printer_af98341247a79474693d7d95370aae68c}

\begin{DoxyCompactList}\small\item\em Visit an element. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_aaf7908e7bb583fc2c522e122ef032e12}{virtual bool \hyperlink{classduye_1_1_xml_printer_aaf7908e7bb583fc2c522e122ef032e12}{visit} (const \hyperlink{classduye_1_1_xml_declaration}{Xml\-Declaration} \&declaration)}\label{classduye_1_1_xml_printer_aaf7908e7bb583fc2c522e122ef032e12}

\begin{DoxyCompactList}\small\item\em Visit a declaration. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_a106dc0a8dcd53aa8b5d8164a52d7a7ca}{virtual bool \hyperlink{classduye_1_1_xml_printer_a106dc0a8dcd53aa8b5d8164a52d7a7ca}{visit} (const \hyperlink{classduye_1_1_xml_text}{Xml\-Text} \&text)}\label{classduye_1_1_xml_printer_a106dc0a8dcd53aa8b5d8164a52d7a7ca}

\begin{DoxyCompactList}\small\item\em Visit a text node. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_a55f2c675e02d1b527e09c5fde2c81827}{virtual bool \hyperlink{classduye_1_1_xml_printer_a55f2c675e02d1b527e09c5fde2c81827}{visit} (const \hyperlink{classduye_1_1_xml_comment}{Xml\-Comment} \&comment)}\label{classduye_1_1_xml_printer_a55f2c675e02d1b527e09c5fde2c81827}

\begin{DoxyCompactList}\small\item\em Visit a comment node. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_ab53beeaf2a530995c6da3f0ef75df4f0}{virtual bool \hyperlink{classduye_1_1_xml_printer_ab53beeaf2a530995c6da3f0ef75df4f0}{visit} (const \hyperlink{classduye_1_1_xml_unknown}{Xml\-Unknown} \&unknown)}\label{classduye_1_1_xml_printer_ab53beeaf2a530995c6da3f0ef75df4f0}

\begin{DoxyCompactList}\small\item\em Visit an unknown node. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_a1225526922f05fb86601f3b8fb2981a2}{void \hyperlink{classduye_1_1_xml_printer_a1225526922f05fb86601f3b8fb2981a2}{set\-Indent} (const char $\ast$\hyperlink{classduye_1_1_xml_printer_a90ca4b079079665c7396a1356825773b}{indent})}\label{classduye_1_1_xml_printer_a1225526922f05fb86601f3b8fb2981a2}

\begin{DoxyCompactList}\small\item\em Set the indent characters for printing. By default 4 spaces but tab () is also useful, or null/empty string for no indentation. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_a90ca4b079079665c7396a1356825773b}{const char $\ast$ \hyperlink{classduye_1_1_xml_printer_a90ca4b079079665c7396a1356825773b}{indent} ()}\label{classduye_1_1_xml_printer_a90ca4b079079665c7396a1356825773b}

\begin{DoxyCompactList}\small\item\em Query the indention string. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_a9953783b2bfdafa33f0587d71094e411}{void \hyperlink{classduye_1_1_xml_printer_a9953783b2bfdafa33f0587d71094e411}{set\-Line\-Break} (const char $\ast$\hyperlink{classduye_1_1_xml_printer_a4ef083d20db1bc2c824953eef8ecb7ab}{line\-Break})}\label{classduye_1_1_xml_printer_a9953783b2bfdafa33f0587d71094e411}

\begin{DoxyCompactList}\small\item\em Set the line breaking string. By default set to newline (\par
). Some operating systems prefer other characters, or can be set to the null/empty string for no indenation. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_a4ef083d20db1bc2c824953eef8ecb7ab}{const char $\ast$ \hyperlink{classduye_1_1_xml_printer_a4ef083d20db1bc2c824953eef8ecb7ab}{line\-Break} ()}\label{classduye_1_1_xml_printer_a4ef083d20db1bc2c824953eef8ecb7ab}

\begin{DoxyCompactList}\small\item\em Query the current line breaking string. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_ae5f1b73e8dee46adf7783fcbcaa50292}{void \hyperlink{classduye_1_1_xml_printer_ae5f1b73e8dee46adf7783fcbcaa50292}{set\-Stream\-Printing} ()}\label{classduye_1_1_xml_printer_ae5f1b73e8dee46adf7783fcbcaa50292}

\begin{DoxyCompactList}\small\item\em Switch over to \char`\"{}stream printing\char`\"{} which is the most dense formatting without linebreaks. Common when the X\-M\-L is needed for network transmission. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_ab1c55909aaa1908f0610ec62e09b1864}{const char $\ast$ \hyperlink{classduye_1_1_xml_printer_ab1c55909aaa1908f0610ec62e09b1864}{c\-Str} ()}\label{classduye_1_1_xml_printer_ab1c55909aaa1908f0610ec62e09b1864}

\begin{DoxyCompactList}\small\item\em Return the result. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_ab45cbd7e9be2abb08005b7fce76c7aa2}{size\-\_\-t \hyperlink{classduye_1_1_xml_printer_ab45cbd7e9be2abb08005b7fce76c7aa2}{size} ()}\label{classduye_1_1_xml_printer_ab45cbd7e9be2abb08005b7fce76c7aa2}

\begin{DoxyCompactList}\small\item\em Return the length of the result string. \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_xml_printer_a6d2731c379d377e4f5b67e9f781bbc9c}{const std\-::string \& \hyperlink{classduye_1_1_xml_printer_a6d2731c379d377e4f5b67e9f781bbc9c}{str} ()}\label{classduye_1_1_xml_printer_a6d2731c379d377e4f5b67e9f781bbc9c}

\begin{DoxyCompactList}\small\item\em Return the result. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Print to memory functionality. The G\-Xml\-Printer is useful when you need to\-: 


\begin{DoxyEnumerate}
\item Print to memory (especially in non-\/\-S\-T\-L mode)
\item Control formatting (line endings, etc.)
\end{DoxyEnumerate}

When constructed, the G\-Xml\-Printer is in its default \char`\"{}pretty printing\char`\"{} mode. Before calling Accept() you can call methods to control the printing of the X\-M\-L document. After Xml\-Node\-::\-Accept() is called, the printed document can be accessed via the C\-Str(), Str(), and Size() methods.

G\-Xml\-Printer uses the Visitor A\-P\-I. \begin{DoxyVerb}* GXmlPrinter printer;
* printer.SetIndent( "\t" );
* 
* doc.Accept( &printer );
* fprintf( stdout, "%s", printer.CStr() );
* \end{DoxyVerb}
 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Z\-:/duye/src/duyebase/utils/duye\-\_\-xml.\-h\end{DoxyCompactItemize}
